import request from '@/utils/request'

const api_name = '/eduservice/video'
const vod_api = '/admin/vod/video'

export default {
  
    addVideo(video) {
        return request({
            url: `${api_name}/saveVideo`,
            method: 'post',
            data: video
        })
    },
    getVideoId(videoId) {
        return request({
            url: `${api_name}/videoInfo/${videoId}`,
            method: 'get'
        })    
    },
    updateVideo(video){
        return request({
            url: `${api_name}/updateVideo/${video.id}`,
            method: 'post',
            data: video
        })   
    },
    //删除oss视频
    removeById(videoId){
        return request({
            url: `${vod_api}/${videoId}`,
            method: 'delete'
        })   
    },
    //删除课的方法
    deleteVideo(videoId) {
        return request({
            url:  `${api_name}/${videoId}`,
            method: 'delete'
        })
    },
}   